package com.archgeek.java.biz;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;

/**
 * @author pizhihui
 * @date 2023-11-21 19:54
 */
public class SplitTest {

    public static void main(String[] args) throws IOException {


        // String s = "100|1168500\tlabel:f501700\t[FEAUKRT6Q1, FELDDBIS1S, FEDKZPYRPP]";
        String s = "100|1168500\\u001label:f501700\\u001[FEAUKRT6Q1, FELDDBIS1S, FEDKZPYRPP]";

        String path = "/Users/pizhihui/ProjectsIdea/code-bigdata/code-00java/src/main/resources/splittxt.txt";
        List<String> lines = Files.readAllLines(Paths.get(path));

        for (int i = 0; i < lines.size(); i++) {
            String line = lines.get(i);
            System.out.println("第" + (i+1) + "内容:" + line);
//            String[] valueStrSplit = line.split("[ |\t|\\\\u001]+", 3);
            String[] valueStrSplit = line.split("\\\\u001", 3);
            for (String s1 : valueStrSplit) {
                System.out.println(s1);
            }

        }


    }


}
